package com.woniuxy.main.pojo;

import java.math.BigDecimal;

/**
 * Copyright (C), 2019-9012, sun sss info. Co., Ltd.
 *
 * @author Su
 * @version 1.0
 * ClassName: Order
 * Description: 订单表实体类
 * @date 2019/7/31 10:45
 **/
public class Order {
    /**
     * order_id   int(11) NOT NULL   id主键
     * ordernum   char(16) NULL      订单号
     * paynum     char(32) NULL      支付号
     * money      decimal(8,5) NULL  支付金额
     * deposit    int(11) NULL       押金
     * otherexp   decimal(8,5) NULL 其他消费
     * trueexp    decimal(8,5) NULL 实际消费
     * orderdate  char(32) NULL     预定时间  请统一时间格式 yyyy:MM:dd HH:mm:ss
     * startdate  char(32) NULL     入住时间
     * enddate    char(32) NULL     退房时间
     * day        int(11) NULL      预定天数
     * user_id    int(11) NULL      用户_id
     * staff_id   int(11) NULL      员工_id
     * comment    char(250) NULL    评价
     * star       char(5) NULL      评分
     * remark     char(150) NULL    备注 用于描述额外付款详情
     * roomtype int(32) NULL  房间类型外键 预定时 用字段
     * roomnum  int(11) NULL  房间数      预定时 用字段
     * status     int(11) NULL      订单状态 详情见getStatusStr()方法
     * flag       int(11) NULL      软删除 0存在 1删除
     */
    private Integer order_id;
    private String ordernum;
    private String paynum;
    private String  payway;
    private BigDecimal money;
    private Integer deposit;
    private BigDecimal otherexp;
    private BigDecimal trueexp;
    private String orderdate;
    private String startdate;
    private String enddate;
    private Integer day;
    private Integer user_id;
    private Integer staff_id;
    private String comment;
    private String star;
    private String remark;
    private Integer roomtype;
    private Integer roomnum;
    private Integer status;
    private String statusStr;
    private Integer flag;

    private User user;
    private Staff staff;

    public Integer getOrder_id() {
        return order_id;
    }

    public void setOrder_id(Integer order_id) {
        this.order_id = order_id;
    }

    public String getOrdernum() {
        return ordernum;
    }

    public void setOrdernum(String ordernum) {
        this.ordernum = ordernum;
    }

    public String getPaynum() {
        return paynum;
    }

    public void setPaynum(String paynum) {
        this.paynum = paynum;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Integer getDeposit() {
        return deposit;
    }

    public void setDeposit(Integer deposit) {
        this.deposit = deposit;
    }

    public BigDecimal getOtherexp() {
        return otherexp;
    }

    public void setOtherexp(BigDecimal otherexp) {
        this.otherexp = otherexp;
    }

    public BigDecimal getTrueexp() {
        return trueexp;
    }

    public void setTrueexp(BigDecimal trueexp) {
        this.trueexp = trueexp;
    }

    public String getOrderdate() {
        return orderdate;
    }

    public void setOrderdate(String orderdate) {
        this.orderdate = orderdate;
    }

    public String getStartdate() {
        return startdate;
    }

    public void setStartdate(String startdate) {
        this.startdate = startdate;
    }

    public String getEnddate() {
        return enddate;
    }

    public void setEnddate(String enddate) {
        this.enddate = enddate;
    }

    public Integer getDay() {
        return day;
    }

    public void setDay(Integer day) {
        this.day = day;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    public Integer getStaff_id() {
        return staff_id;
    }

    public void setStaff_id(Integer staff_id) {
        this.staff_id = staff_id;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getStar() {
        return star;
    }

    public void setStar(String star) {
        this.star = star;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusStr() {
        if (status != null) {
            if (status == 0) {
                statusStr = "等待付款";
            }
            if (status == 1) {
                statusStr = "已支付押金";
            }
            if (status == 2) {
                statusStr = "预约成功";
            }
            if (status == 3) {
                statusStr = "预约失败";
            }
            if (status == 4) {
                statusStr = "入住成功";
            }
            if (status == 5) {
                statusStr = "申请取消订单";
            }
            if (status == 6) {
                statusStr = "已退款";
            }
            if (status == 7) {
                statusStr = "取消成功";
            }
            if (status == 8) {
                statusStr = "订单完成";
            }
            if (status == 9) {
                statusStr = "订单完成（已评论）";
            }
            if (status == 10){
                statusStr = "团队订单";
            }
        }
        return statusStr;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    public Integer getRoomtype() {
        return roomtype;
    }

    public void setRoomtype(Integer roomtype) {
        this.roomtype = roomtype;
    }

    public Integer getRoomnum() {
        return roomnum;
    }

    public void setRoomnum(Integer roomnum) {
        this.roomnum = roomnum;
    }

    public String getPayway() {
        return payway;
    }

    public void setPayway(String payway) {
        this.payway = payway;
    }

    @Override
    public String toString() {
        return "Order{" +
                "order_id=" + order_id +
                ", ordernum='" + ordernum + '\'' +
                ", paynum='" + paynum + '\'' +
                ", payway='" + payway + '\'' +
                ", money=" + money +
                ", deposit=" + deposit +
                ", otherexp=" + otherexp +
                ", trueexp=" + trueexp +
                ", orderdate='" + orderdate + '\'' +
                ", startdate='" + startdate + '\'' +
                ", enddate='" + enddate + '\'' +
                ", day=" + day +
                ", user_id=" + user_id +
                ", staff_id=" + staff_id +
                ", comment='" + comment + '\'' +
                ", star='" + star + '\'' +
                ", remark='" + remark + '\'' +
                ", roomtype=" + roomtype +
                ", roomnum=" + roomnum +
                ", status=" + status +
                ", statusStr='" + statusStr + '\'' +
                ", flag=" + flag +
                ", user=" + user +
                ", staff=" + staff +
                '}';
    }
}


